<template>
  <div>
    <h2>父组件</h2>
    <!-- <ChildComponent>
      <template #default="slotProps">
        <p>从子组件传递的数据: {{ slotProps.data }}</p>
      </template>
    </ChildComponent> -->
    <!-- <ChildComponent>
      <template v-slot="slotProps">
        <p>从子组件传递的数据: {{ slotProps.data }}</p>
      </template>
    </ChildComponent> -->
    <!-- <ChildComponent>
      <template v-slot:title="slotProps">
        <p>从子组件传递的数据: {{ slotProps.data }}</p>
      </template>
    </ChildComponent> -->
    <ChildComponent>
      <template #title="slotProps">
        <p>从子组件传递的数据: {{ slotProps.data }}</p>
      </template>
    </ChildComponent>
  </div>
</template>

<script setup>
import { ref } from 'vue'
import ChildComponent from './ChildComponent.vue'
</script>
